Skip to content

Add shopper favorites (session state + header quick list)#21

Open
mattfromcursor wants to merge 1 commit into
mainfrom
cursor/shopper-favorites-3afd
Open

Add shopper favorites (session state + header quick list)#21
mattfromcursor wants to merge 1 commit into
mainfrom
cursor/shopper-favorites-3afd

Conversation

@mattfromcursor

Copy link
Copy Markdown
Owner

What changed

  • Added session-scoped FavoritesState with keyed toggle semantics and change notifications.
  • Added FavoritesMenu to HeaderBar (top-right icon + compact click-to-open dropdown).
  • Added favorites heart toggle on product detail page.
  • Added WebApp-only favorites heart overlay on catalog cards (without coupling shared CatalogListItem).
  • Added Playwright specs for favorites and updated anonymous-signed-out behavior coverage.
  • Updated playwright.config.ts to disable NuGet audit and enable ESHOP_USE_HTTP_ENDPOINTS for AppHost during E2E runs.

Testing

  • dotnet restore eShop.Web.slnf -p:NuGetAudit=false
  • dotnet build eShop.Web.slnf -p:NuGetAudit=false -p:LibraryRestore=False
  • dotnet test --project tests/Ordering.UnitTests/Ordering.UnitTests.csproj -p:NuGetAudit=false

Notes

  • Playwright E2E web server startup was attempted; it timed out waiting for the configured baseURL during this run, so the new Playwright flows were not executed to completion in this environment.
Open in Web Open in Cursor 

Co-authored-by: mattfromcursor <mattfromcursor@users.noreply.github.com>
@mattfromcursor mattfromcursor marked this pull request as ready for review June 23, 2026 21:59
@mattfromcursor

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cf51688. Configure here.

class="favorites-heart-button"
aria-label="@(IsLoggedIn ? (isFavorited ? "Remove from favorites" : "Save to favorites") : "Log in to save favorites")"
title="@(IsLoggedIn ? (isFavorited ? "Remove from favorites" : "Save to favorites") : "Log in to save favorites")"
@onclick="ToggleFavoriteAsync">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static components use click handlers

High Severity

CatalogListItemWithFavorites and FavoritesMenu wire @onclick handlers but neither component declares an interactive render mode, while catalog and layout pages render statically. In Blazor Web Apps, static SSR does not dispatch those events, so catalog hearts, the header favorites control, and signed-out login redirects from the catalog will not run.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cf51688. Configure here.

}

_cachedFavorites = null;
await NotifyChangeSubscribersAsync();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Favorites vanish after navigation

High Severity

FavoritesState keeps product IDs only in scoped in-memory fields, with no session or backend persistence. Product links in the catalog and favorites dropdown set data-enhance-nav="false", forcing full page loads and new DI scopes, so favorites added on one page are empty on the next—contrary to the E2E flow that favorites from the catalog and then opens the item from the header list.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cf51688. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants